<%--
  Created by IntelliJ IDEA.
  User: You
  Date: 2020/5/17
  Time: 10:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*,com.xingyun.info_manager.entity.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <link rel="stylesheet" href="../../css/global.css">
    <link rel="stylesheet" href="../../icheck/minimal/red.css">

</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <%--<div class="layui-header">--%>
        <%--<!-- 引入公共头区域 -->--%>
        <%--<%@include file="../commen/head.jsp" %>--%>
    <%--</div>--%>

    <%--<div class="layui-side layui-bg-black">--%>
        <%--<div class="layui-side-scroll">--%>
            <%--<!-- 引入左侧导航区域（可配合layui已有的垂直导航） -->--%>
            <%--<%@include file="../commen/menu.jsp" %>--%>
        <%--</div>--%>
    <%--</div>--%>

    <%--<div class="layui-body">--%>
        <!-- 内容主体区域 -->
        <%--<div style="padding: 15px;">--%>
            <%--<fieldset class="layui-elem-field">--%>
                <%--<legend>用户管理 - 用户列表</legend>--%>
        <div class="layui-field-box">
            <%--<form class="layui-form" action="">--%>
                <%--<div class="layui-form-item" >--%>
                    <%--<label class="layui-form-label" style="width: 50px;text-align: left;">输入框</label>--%>
                    <%--<div class="layui-input-inline">--%>
                        <%--<input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">--%>
                    <%--</div>--%>
                    <%--<div class="layui-inline" style="text-align:left;">--%>
                        <%--<div class="layui-input-inline">--%>
                            <%--<button class="layui-btn layui-btn-sm"><i class="layui-icon">&#xe615;</i>查询</button>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                <%--</div>--%>
            <%--</form>--%>
            <hr>
            <div class="layui-btn-container">
                <button class="layui-btn layui-btn-sm layui-btn-normal dw-dailog" dw-url="create.html" dw-title="新增用户" dw-width="50%" dw-height="60%">
                    <i class="layui-icon">&#xe654;</i>新增
                </button>
                <button class="layui-btn layui-btn-sm layui-btn-danger dw-batch-delete" dw-url="./delete.json">
                    <i class="layui-icon">&#xe640;</i>删除
                </button>
                <button class="layui-btn layui-btn-sm dw-refresh">
                    <i class="layui-icon">&#x1002;</i>刷新
                </button>
            </div>
            <%--<hr>--%>
            <table class="layui-table" id="demo" lay-filter="demo" >
                <thead>
                <tr>
                    <th lay-data="{type: 'checkbox', fixed: true}" ></th>
                    <th lay-data="{field:'userName'}">登录名</th>
                    <th lay-data="{field:'realName'}">真实姓名</th>
                    <th lay-data="{field:'userMobile'}">手机号</th>
                    <th lay-data="{field:'roleName'}">角色权限</th>
                    <th lay-data="{field:'userState'}">用户状态</th>
                    <th lay-data="{field:'createName'}">创建人姓名</th>
                    <th lay-data="{field:'createTime'}">创建时间</th>
                    <th lay-data="{field:'username'}" style="text-align:center;">操作</th>
                </tr>
                </thead>
                <tbody >
                <c:forEach items="${adminList }" var="admin">
                    <tr>
                        <td>

                        </td>
                        <td>${admin.userName}</td>
                        <td>${admin.realName}</td>
                        <td>${admin.userMobile}</td>
                        <td>${admin.roleName}</td>
                        <td class="text-center">
                            <input  type="checkbox" value="${admin.userState }"  name="userState" lay-skin="switch" lay-text="启用|禁用">
                        </td>
                        <td>${admin.createName}</td>
                        <td>${admin.createTime}</td>
                        <td class="text-center ">
                            <div class="layui-btn-container">
                                <button class="layui-btn layui-btn-xs layui-btn-normal dw-dailog" dw-url="create.html?id=1" dw-title="编辑用户">
                                    <i class="layui-icon">&#xe642;</i>编辑
                                </button>
                                <button class="layui-btn layui-btn-xs layui-btn-danger dw-delete" dw-url="delete.html?id=1" dw-title="小明">
                                    <i class="layui-icon">&#xe640;</i>删除
                                </button>
                            </div>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <form class="layui-form" action="" lay-filter="form1" id="form1">
                <div class="layui-form-item">
                    <label class="layui-form-label">开关</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="switch" lay-skin="switch">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">单选框</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="男" title="男">
                        <input type="radio" name="sex" value="女" title="女" checked>
                    </div>
                </div>
            </form>
        </div>

            <%--</fieldset>--%>
        <%--</div>--%>
    <%--</div>--%>

    <%--<div class="layui-footer">--%>
        <%--<!-- 底部固定区域 -->--%>
        <%--© layui.com - 底部固定区域--%>
    <%--</div>--%>
</div>
<script type="text/javascript" src="../../javascript/jquery.min.js"></script>
<script type="text/javascript" src="../../layui/layui.all.js"></script>
<script type="text/javascript" src="../../icheck/icheck.js"></script>
<script type="text/javascript" src="../../javascript/dw.js"></script>
<script>

    $(function () {
        pageInit();
    });

    layui.use('form1', function(){
        var form = layui.form1;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });


    function pageInit() {
        var table = layui.table;
        //转换静态表格
        table.init('demo', {
            height: 300 //设置高度
            ,limit: 10 //注意：请务必确保 limit 参数（默认：10）是与你服务端限定的数据条数一致
            ,limits:[5,10,15,20]
            ,page: true //开启分页
            //支持所有基础参数
        });
    }


</script>
</body>
</html>
